keys = {
    "输出": "print",
    "输入": "input",
    "如果": "if",
    "循环": "while",
    "真": "True",
    "：": ":",
    "（": "(",
    "）": ")"
}
x = input("是否要替换文件(N/Y)")
if x == 'Y' or x == 'y':
    s = input("文件路径(如:D:\\1234.txt):")

with open(s, "r", encoding="utf-8") as file:
    # 读取文件内容
    code = file.read()

#转换关键字
for key in keys:
    code = code.replace(key, keys[key])

#执行
exec(code)